/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define MCU_RUN_Pin GPIO_PIN_13
#define MCU_RUN_GPIO_Port GPIOC
#define EC200U_MAIN_DTR_Pin GPIO_PIN_0
#define EC200U_MAIN_DTR_GPIO_Port GPIOC
#define EC200U_RST_Pin GPIO_PIN_1
#define EC200U_RST_GPIO_Port GPIOC
#define EC200U_PWR_KEY_Pin GPIO_PIN_2
#define EC200U_PWR_KEY_GPIO_Port GPIOC
#define EC200U_PWR_EN_Pin GPIO_PIN_3
#define EC200U_PWR_EN_GPIO_Port GPIOC
#define EC200U_WAKE_Pin GPIO_PIN_0
#define EC200U_WAKE_GPIO_Port GPIOA
#define EC200U_IRQ_Pin GPIO_PIN_1
#define EC200U_IRQ_GPIO_Port GPIOA
#define EC200U_IRQ_EXTI_IRQn EXTI1_IRQn
#define EC200U_TX2_Pin GPIO_PIN_2
#define EC200U_TX2_GPIO_Port GPIOA
#define EC200U_RX2_Pin GPIO_PIN_3
#define EC200U_RX2_GPIO_Port GPIOA
#define LOCK_MOTOR_EN_Pin GPIO_PIN_4
#define LOCK_MOTOR_EN_GPIO_Port GPIOA
#define AN_INB_Pin GPIO_PIN_5
#define AN_INB_GPIO_Port GPIOA
#define BT_BUSY_Pin GPIO_PIN_6
#define BT_BUSY_GPIO_Port GPIOA
#define BUZZER_PWMN_Pin GPIO_PIN_7
#define BUZZER_PWMN_GPIO_Port GPIOA
#define AN_INA_Pin GPIO_PIN_5
#define AN_INA_GPIO_Port GPIOC
#define CAN_STB_Pin GPIO_PIN_2
#define CAN_STB_GPIO_Port GPIOB
#define L_LIGHT_PWR_DEC_Pin GPIO_PIN_10
#define L_LIGHT_PWR_DEC_GPIO_Port GPIOB
#define L_LIGHT_PWR_DEC_EXTI_IRQn EXTI15_10_IRQn
#define BT_PWR_EN_Pin GPIO_PIN_11
#define BT_PWR_EN_GPIO_Port GPIOB
#define W25Q32_CS_Pin GPIO_PIN_12
#define W25Q32_CS_GPIO_Port GPIOB
#define W25Q32_SCK_Pin GPIO_PIN_13
#define W25Q32_SCK_GPIO_Port GPIOB
#define W25Q32_MISO_Pin GPIO_PIN_14
#define W25Q32_MISO_GPIO_Port GPIOB
#define W25Q32_MOSI_Pin GPIO_PIN_15
#define W25Q32_MOSI_GPIO_Port GPIOB
#define PHASE_INT_Pin GPIO_PIN_6
#define PHASE_INT_GPIO_Port GPIOC
#define PHASE_INT_EXTI_IRQn EXTI9_5_IRQn
#define ACC_DET_Pin GPIO_PIN_7
#define ACC_DET_GPIO_Port GPIOC
#define ACC_DET_EXTI_IRQn EXTI9_5_IRQn
#define DC72V_OUTA_EN_Pin GPIO_PIN_8
#define DC72V_OUTA_EN_GPIO_Port GPIOC
#define BT_INT_Pin GPIO_PIN_9
#define BT_INT_GPIO_Port GPIOC
#define BT_INT_EXTI_IRQn EXTI9_5_IRQn
#define BUZZER_PWM_Pin GPIO_PIN_8
#define BUZZER_PWM_GPIO_Port GPIOA
#define BT_TX1_Pin GPIO_PIN_9
#define BT_TX1_GPIO_Port GPIOA
#define BT_RX1_Pin GPIO_PIN_10
#define BT_RX1_GPIO_Port GPIOA
#define DC72V_OUT_DET_Pin GPIO_PIN_11
#define DC72V_OUT_DET_GPIO_Port GPIOA
#define DC72V_OUT_DET_EXTI_IRQn EXTI15_10_IRQn
#define GS_INT_Pin GPIO_PIN_12
#define GS_INT_GPIO_Port GPIOA
#define GS_INT_EXTI_IRQn EXTI15_10_IRQn
#define CAN_INT_Pin GPIO_PIN_15
#define CAN_INT_GPIO_Port GPIOA
#define CAN_INT_EXTI_IRQn EXTI15_10_IRQn
#define VSTRART_EN_Pin GPIO_PIN_10
#define VSTRART_EN_GPIO_Port GPIOC
#define L_LIGHT_EN_Pin GPIO_PIN_11
#define L_LIGHT_EN_GPIO_Port GPIOC
#define LOG_TX5_Pin GPIO_PIN_12
#define LOG_TX5_GPIO_Port GPIOC
#define LOG_RX5_Pin GPIO_PIN_2
#define LOG_RX5_GPIO_Port GPIOD
#define R_LIGHT_PWR_DEC_Pin GPIO_PIN_4
#define R_LIGHT_PWR_DEC_GPIO_Port GPIOB
#define R_LIGHT_PWR_DEC_EXTI_IRQn EXTI4_IRQn
#define MCU_BMS_DET_Pin GPIO_PIN_5
#define MCU_BMS_DET_GPIO_Port GPIOB
#define MCU_BMS_DET_EXTI_IRQn EXTI9_5_IRQn
#define BUZZER_VOL2_CTR2_Pin GPIO_PIN_6
#define BUZZER_VOL2_CTR2_GPIO_Port GPIOB
#define R_LIGHT_EN_Pin GPIO_PIN_7
#define R_LIGHT_EN_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
